/**
 * 对跳转页面的函数二次封装
 */
function jumpPage(url, params) {
  let urls
  if (!Object.keys(params).length) {
    urls = url
  } else {
    urls = '?'
    for (const key in params) {
      urls = urls + key + '=' + params[key] + '&'
    }
    urls = url + urls;
    urls = urls.substring(0, urls.lastIndexOf('&'));
  }
  wx.navigateTo({
    url: urls,
  })
}


export default {
  jumpPage
}